package com.zhijian.warehouse.manage.entity.vo.request;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * 分页vo
 *
 * @author HCG
 * @version 1.0
 * @date 2023-10-07
 */
@Data
@Api(tags = "分页vo")
@NoArgsConstructor
@AllArgsConstructor
public class PageVo implements Serializable {

    private static final long serialVersionUID = 5014402668104829763L;

    /**
     * 页码
     */
    @ApiModelProperty("页码")
    @Min(value = 1, message = "页码不能小于1|pageNum can't less than 1")
    private Integer pageNum;

    /**
     * 数据库查询参数，前端忽略
     */
    @ApiModelProperty(value = "页码", hidden = true)
    private Integer startIndex;

    /**
     * 条数
     */
    @ApiModelProperty("每页显示的条数")
    @Min(value = 2, message = "每页显示的条数不能小于2|pageSize can't less than 2")
    private Integer pageSize;
}
